﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="SInfoActiveX.Test.Test" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <script type="text/javascript">
        function SaveImage() {
            var sFileName = document.getElementById("txt_fileName").value;
            document.getElementById("CommonActiveX").SaveClipboardImage(sFileName);
        };
        function SaveImageToServer() {
            var sUrl = document.getElementById("txt_url").value;
            alert(document.getElementById("CommonActiveX").PostClipboardImageToUrl(sUrl));
        };
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <label>保存路径：</label><input type="text" id="txt_fileName" value="D:\aaa.png" />
    <input type="button" value="保存剪切板图片" onclick="SaveImage()" />
    <br />
    <label>保存的url：</label><input type="text" id="txt_url" style="width:5cm" value="http://localhost:25751/Test3.web/TestUtility/testMyNetPostData.aspx" />
    <input type="button" value="保存剪切板图片到服务器" onclick="SaveImageToServer()" />
    <div>
        <object id='CommonActiveX' name='CommonActiveX' classid='clsid:68BC0A33-44F8-4B95-81B7-654E0EE939F2'></object>
    </div>
    </form>
</body>
</html>
